<template>
  <div class="personalcertificate">
    <van-nav-bar title="实名认证" left-arrow @click-left="onClickLeft" />
    <van-notice-bar
      :scrollable="false"
      text="上传的资料仅用于资料审核,公司会严格保密不会外传。"
      color="#999999"
      background="#eff6fe"
    />
    <div class="upload">
      <p>上传照片</p>
      <div class="identity-card">
        <div>
          <van-uploader v-model="fileList" preview-size='100px' multiple :max-count="1" />
          <img src="../../assets/img/身份证正面@2x.png" alt="">
          <p>身份证国徽面</p>
        </div>
        <div>
          <van-uploader v-model="fileList" preview-size='100px' multiple :max-count="1" />
          <img src="../../assets/img/身份证背面@2x.png" alt="">
          <p>身份证照片面</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { ref } from "vue";
import router from "../../router/index.js";
export default {
  setup() {
    //点击跳转回我的页面
    const onClickLeft = () => {
      router.push("/mine");
    };
    //存放文件上传的值
    const fileList = ref([]);
    return {
      onClickLeft,
      fileList,
    };
  },
};
</script>
<style>
.personalcertificate .identity-card{
  display: flex;
  justify-content: space-between;
}
.personalcertificate .upload{
  padding: 20px;
}
.personalcertificate .van-uploader__upload{
  border-radius: 50%;
  background-color: #dedede;
}
.personalcertificate .van-uploader__upload i{
  color: #b2b2b2;
 
}
.personalcertificate .van-uploader__upload i::before{
  width: 80px;
  height: 80px;
  text-align: center;
  line-height: 80px;
  font-size: 50px;
}
.personalcertificate .identity-card img{
  width: 80px;
  margin: 10px auto;
  display: block;
}
.personalcertificate .identity-card p{
  font-size: 15px;
  color: #b2b2b2;
  text-align: center;
}
.personalcertificate  .van-uploader__wrapper{
  border: 1px dashed #ccc;
  width: 100px;
  height: 100px;
  padding: 25px;
  
}
</style>
